package org.kunteng.yunac.util;

import java.util.Random;

public class StringUtil {
  /**
   * 随机生成大写字母和数字组成的3位字符
   * @return
   */
  public static String random() {
    char[] codeSequence = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R','S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
                                              '0', '1', '2', '3', '4', '5', '6', '7', '8','9' };
    char[] result = new char[3];
    Random random = new Random();
    for (int i = 0; i < 3; i++) {
      result[i] = codeSequence[random.nextInt(36)];
    }
    return String.valueOf(result);
  }

}
